home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / c++ / strstream.z / strstream
Encoding:
Text File  |  1998-10-30  |  13.7 KB  |  199 lines

  1.  
  2.  
  3.  
  4. SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))                                                SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      strstream - iostream specialized to arrays
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_...._hhhh_>>>>
  13.  
  14.      _cccc_llll_aaaa_ssss_ssss _iiii_oooo_ssss _{{{{
  15.      _pppp_uuuu_bbbb_llll_iiii_cccc_::::
  16.                _eeee_nnnn_uuuu_mmmm      _oooo_pppp_eeee_nnnn______mmmm_oooo_dddd_eeee _{{{{ _iiii_nnnn_,,,, _oooo_uuuu_tttt_,,,, _aaaa_tttt_eeee_,,,, _aaaa_pppp_pppp_,,,, _tttt_rrrr_uuuu_nnnn_cccc_,,,, _nnnn_oooo_cccc_rrrr_eeee_aaaa_tttt_eeee_,,,, _nnnn_oooo_rrrr_eeee_pppp_llll_aaaa_cccc_eeee _}}}} _;;;;
  17.                _////_//// _aaaa_nnnn_dddd _llll_oooo_tttt_ssss _oooo_ffff _oooo_tttt_hhhh_eeee_rrrr _ssss_tttt_uuuu_ffff_ffff_,,,, _ssss_eeee_eeee _iiii_oooo_ssss_((((_3333_CCCC_++++_++++_)))) _...._...._....
  18.      _}}}} _;;;;
  19.  
  20.      _cccc_llll_aaaa_ssss_ssss _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm _:::: _pppp_uuuu_bbbb_llll_iiii_cccc _iiii_ssss_tttt_rrrr_eeee_aaaa_mmmm _{{{{
  21.      _pppp_uuuu_bbbb_llll_iiii_cccc_::::
  22.                          _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_cccc_hhhh_aaaa_rrrr_****_)))) _;;;;
  23.                          _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_cccc_hhhh_aaaa_rrrr_****_,,,, _iiii_nnnn_tttt_)))) _;;;;
  24.                _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff_****_rrrr_dddd_bbbb_uuuu_ffff_((((_)))) _;;;;
  25.      _}}}} _;;;;
  26.  
  27.      _cccc_llll_aaaa_ssss_ssss _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm _:::: _pppp_uuuu_bbbb_llll_iiii_cccc _oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm _{{{{
  28.      _pppp_uuuu_bbbb_llll_iiii_cccc_::::
  29.                          _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_))))_;;;;
  30.                          _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_cccc_hhhh_aaaa_rrrr_****_,,,, _iiii_nnnn_tttt_,,,, _iiii_nnnn_tttt_====_iiii_oooo_ssss_::::_::::_oooo_uuuu_tttt_)))) _;;;;
  31.                _iiii_nnnn_tttt       _pppp_cccc_oooo_uuuu_nnnn_tttt_((((_)))) _;;;;
  32.                _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff_****_rrrr_dddd_bbbb_uuuu_ffff_((((_)))) _;;;;
  33.                _cccc_hhhh_aaaa_rrrr_****     _ssss_tttt_rrrr_((((_))))_;;;;
  34.      _}}}}_;;;;
  35.  
  36.      _cccc_llll_aaaa_ssss_ssss _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm _:::: _pppp_uuuu_bbbb_llll_iiii_cccc _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_aaaa_ssss_eeee_,,,, _pppp_uuuu_bbbb_llll_iiii_cccc _iiii_oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm _{{{{
  37.      _pppp_uuuu_bbbb_llll_iiii_cccc_::::
  38.                          _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_))))_;;;;
  39.                          _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_cccc_hhhh_aaaa_rrrr_****_,,,, _iiii_nnnn_tttt_,,,, _iiii_nnnn_tttt _mmmm_oooo_dddd_eeee_))))_;;;;
  40.                _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff_****_rrrr_dddd_bbbb_uuuu_ffff_((((_)))) _;;;;
  41.                _cccc_hhhh_aaaa_rrrr_****     _ssss_tttt_rrrr_((((_))))_;;;;
  42.      _}}}}_;;;;
  43.  
  44.  
  45. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  46.      _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm specializes _iiii_oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm for ``incore'' operations, that is,
  47.      storing and fetching from arrays of bytes.  The _ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff associated with
  48.      a _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm is a _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff (see _ssss_ssss_bbbb_uuuu_ffff(3C++)).
  49.  
  50.      In the following descriptions assume:
  51.      - _s_s is a _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm.
  52.      - _i_s_s is an _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm.
  53.      - _o_s_s is an _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm.
  54.      - _c_p is a _cccc_hhhh_aaaa_rrrr_****.
  55.      - _m_o_d_e is an _iiii_nnnn_tttt representing an _oooo_pppp_eeee_nnnn______mmmm_oooo_dddd_eeee.
  56.      - _i and _l_e_n are _iiii_nnnn_tttts.
  57.      - _s_s_b is a _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff_****.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))                                                SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))
  71.  
  72.  
  73.  
  74.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrrssss
  75.           _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_c_p_))))
  76.                Characters will be fetched from the (null-terminated) string
  77.                _c_p.  The terminating null character will not be part of the
  78.                sequence.  Seeks (_iiii_ssss_tttt_rrrr_eeee_aaaa_mmmm_::::_::::_ssss_eeee_eeee_kkkk_gggg_((((_))))) are allowed within that
  79.                space.
  80.  
  81.           _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_c_p_,,,, _l_e_n_))))
  82.                Characters will be fetched from the array beginning at _c_p and
  83.                extending for _l_e_n bytes. Seeks (_iiii_ssss_tttt_rrrr_eeee_aaaa_mmmm_::::_::::_ssss_eeee_eeee_kkkk_gggg_((((_))))) are allowed
  84.                anywhere within that array.
  85.  
  86.           _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_))))
  87.                Space will be dynamically allocated to hold stored characters.
  88.  
  89.           _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_c_p_,,,,_n_,,,,_m_o_d_e_))))
  90.                Characters will be stored into the array starting at _c_p and
  91.                continuing for _n bytes.  If _iiii_oooo_ssss_::::_::::_aaaa_tttt_eeee or _iiii_oooo_ssss_::::_::::_aaaa_pppp_pppp is set in
  92.                _m_o_d_e, _c_p is assumed to be a null-terminated string and storing
  93.                will begin at the null character.  Otherwise storing will begin
  94.                at _c_p.  Seeks are allowed anywhere in the array.
  95.  
  96.           _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_))))
  97.                Space will be dynamically allocated to hold stored characters.
  98.  
  99.           _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_((((_c_p_,,,,_n_,,,,_m_o_d_e_))))
  100.                Characters will be stored into the array starting at _c_p and
  101.                continuing for _n bytes.  If _iiii_oooo_ssss_::::_::::_aaaa_tttt_eeee or _iiii_oooo_ssss_::::_::::_aaaa_pppp_pppp is set in
  102.                _m_o_d_e, _c_p is assumed to be a null-terminated string and storing
  103.                will begin at the null character.  Otherwise storing will begin
  104.                at _c_p.  Seeks are allowed anywhere in the array.
  105.  
  106.    _iiii_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm mmmmeeeemmmmbbbbeeeerrrrssss
  107.           _s_s_b _==== _i_s_s_...._rrrr_dddd_bbbb_uuuu_ffff_((((_))))
  108.                Returns the _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff associated with _i_s_s.
  109.  
  110.    _oooo_ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm mmmmeeeemmmmbbbbeeeerrrrssss
  111.           _s_s_b _==== _o_s_s_...._rrrr_dddd_bbbb_uuuu_ffff_((((_))))
  112.                Returns the _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff associated with _o_s_s.
  113.  
  114.           _c_p_====_o_s_s_...._ssss_tttt_rrrr_((((_))))
  115.                Returns a pointer to the array being used and ``freezes'' the
  116.                array.  Once _ssss_tttt_rrrr has been called the effect of storing more
  117.                characters into _o_s_s is undefined.  If _o_s_s was constructed with
  118.                an explicit array, _c_p is just a pointer to the array.
  119.                Otherwise, _c_p points to a dynamically allocated area.  Until
  120.                _ssss_tttt_rrrr is called, deleting the dynamically allocated area is the
  121.                responsibility of _o_s_s.  After _ssss_tttt_rrrr returns, the array becomes
  122.                the responsibility of the user program.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))                                                SSSSTTTTRRRRSSSSTTTTRRRREEEEAAAAMMMM((((3333CCCC++++++++))))
  137.  
  138.  
  139.  
  140.           _i_====_o_s_s_...._pppp_cccc_oooo_uuuu_nnnn_tttt_((((_))))
  141.                Returns the number of bytes that have been stored into the
  142.                buffer.  This is mainly of use when binary data has been stored
  143.                and _o_s_s_...._ssss_tttt_rrrr_((((_)))) does not point to a null terminated string.
  144.  
  145.    _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm mmmmeeeemmmmbbbbeeeerrrrssss
  146.           _s_s_b _==== _s_s_...._rrrr_dddd_bbbb_uuuu_ffff_((((_))))
  147.                Returns the _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff associated with _s_s.
  148.  
  149.           _c_p_====_s_s_...._ssss_tttt_rrrr_((((_))))
  150.                Returns a pointer to the array being used and ``freezes'' the
  151.                array.  Once _ssss_tttt_rrrr has been called the effect of storing more
  152.                characters into _s_s is undefined.  If _s_s was constructed with an
  153.                explicit array, _c_p is just a pointer to the array.  Otherwise,
  154.                _c_p points to a dynamically allocated area.  Until _ssss_tttt_rrrr is
  155.                called, deleting the dynamically allocated area is the
  156.                responsibility of _s_s.  After _s_t_r returns, the array becomes the
  157.                responsibility of the user program.
  158.  
  159. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  160.      _ssss_tttt_rrrr_ssss_tttt_rrrr_eeee_aaaa_mmmm_bbbb_uuuu_ffff(3C++), _iiii_oooo_ssss(3C++) _iiii_ssss_tttt_rrrr_eeee_aaaa_mmmm(3C++) _oooo_ssss_tttt_rrrr_eeee_aaaa_mmmm(3C++)
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.